<?php
namespace app\api\validate;

use think\Validate;

class UserValidate extends Validate
{
    protected $rule = [
        'username'  => 'require|max:25',
        'password'   => 'require|alphaDash|max:25',
        'code' => 'require|alphaNum',
    ];
    protected $message = [
        'username.require' => '请填写用户名',
        'username.max'     => '名称最多不能超过25个字符',
        'password.require' => '请填写密码',
        'password.alphaDash' => '密码格式错误',
        'code.require' => '请填写验证码',

    ];
}